declare fild[cnt]
Declare norec[cnt]
DECLARE PATCOD[CNT]
go rec
do while (Pname=pat_name .and. Pfname=pat_f_name) .or. (Pname=pat_f_name .and. Pfname=pat_name)
   cr=cr+1
   norec[cr]  = recno()
   PATCOD[CR] = PAT_FILCOD
   fild[cr]   = pat_name+' '+pat_f_name+'  '+pat_m_init+'   '+pat_sex+'   '+dtoc(pat_dob)+SPACE(5)+chr(186)+SPACE(4)+pat_filcod
   skip
enddo
@ 10,1 CLEA TO 23,78
SET COLO TO BG+/B,W+/N
inkey()
cari=achoice(12,4,20,75,fild)
if lastkey()=13
   OKK='T'
   REC=norec[cari]
   KODEPAT=PATCOD[CARI]
   SELE 1
   SET INDEX TO
   goto REC
   @ 7,1 CLEA TO 23,78
   RETURN
ENDif
